<?php

namespace App\Http\Controllers\Api;

use App\Http\Controllers\Controller;
use App\Http\Services\CourseService;
use App\Http\Traits\ResponseJson;

class CourseController extends Controller
{
    use ResponseJson;

    protected $courseService;

    public function __construct(CourseService $courseService)
    {
        $this->courseService = $courseService;
    }



    public function lists()
    {
        $data = $this->courseService->lists();
        return $this->returnJson($data);
    }

    public function detail()
    {
        $data = $this->courseService->detail();
        return $this->returnJson($data);
    }
}
